@extends('layouts.default')

@section('content')
	<div class="box">
		@if(count($ariane) > 1)
			<p id="ariane">
				@foreach ($ariane as $item)
					@if(end($ariane)->article_id == $item->article_id)
						{{$item->titre}}
					@else
						<a href="{{URL::route('bg-article', $item->url)}}">
							{{$item->titre}}
						</a>&nbsp;>&nbsp;
					@endif
				@endforeach
			</p>
		@endif

		<h2>{{$article->titre}}</h2>

		<div id="encyclopedie-article">
			@if($article->layout == "0")
				@if(!empty($children))
					<h3>Articles liés</h3>
					<ul>
						@foreach($children as $child)
							<li>
								<a href="{{URL::route('bg-article', $child->url)}}">
									{{$child->titre}}
								</a>
					 		</li>
						@endforeach
					</ul>
				@endif

				{{$article->texte}}
			@else
				{{$article->texte}}

				@if(!empty($children))
					<h3>Articles liés</h3>
					<ul>
						@foreach($children as $child)
							<li>
								<a href="{{URL::route('bg-article', $child->url)}}">
										{{$child->titre}}
								</a>
						 	</li>
						@endforeach
					</ul>
				@endif
			@endif
		</div>
	</div>
@stop
